import request from '@/utils/request'

// 查询知识库分类列表
export function listClaifica(query) {
  return request({
    url: '/knowledge/claifica/list',
    method: 'get',
    params: query
  })
}

// 查询知识库分类详细
export function getClaifica(id) {
  return request({
    url: '/knowledge/claifica/' + id,
    method: 'get'
  })
}

// 新增知识库分类
export function addClaifica(data) {
  return request({
    url: '/knowledge/claifica',
    method: 'post',
    data: data
  })
}

// 修改知识库分类
export function updateClaifica(data) {
  return request({
    url: '/knowledge/claifica',
    method: 'put',
    data: data
  })
}

export function falDelClaif(id){
  return request({
    url:'/knowledge/claifica',
    method:'delete',
    params:{id}
  })
}

// 删除知识库分类
export function delClaifica(id) {
  return request({
    url: '/knowledge/claifica/' + id,
    method: 'delete'
  })
}

//获取知识库树形列表
export function getClaificaTree(){
  return request({
    url:'/knowledge/claifica/claificaTree',
    method:'get'
  })
}
